using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class EoyClosingMap : EntityTypeConfiguration<EoyClosing>
    {
        public EoyClosingMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.year)
                .HasMaxLength(4);

            // Table & Column Mappings
            this.ToTable("EoyClosing");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.beforeclosing).HasColumnName("beforeclosing");
            this.Property(t => t.backup1).HasColumnName("backup1");
            this.Property(t => t.FinPrep).HasColumnName("FinPrep");
            this.Property(t => t.Doe).HasColumnName("Doe");
            this.Property(t => t.createHistTrans).HasColumnName("createHistTrans");
            this.Property(t => t.EoyCloseBatch).HasColumnName("EoyCloseBatch");
            this.Property(t => t.FinStmtreport).HasColumnName("FinStmtreport");
            this.Property(t => t.backup2).HasColumnName("backup2");
            this.Property(t => t.PurgeNewdata).HasColumnName("PurgeNewdata");
            this.Property(t => t.backup3).HasColumnName("backup3");
            this.Property(t => t.createDb).HasColumnName("createDb");
            this.Property(t => t.EoyOpenBal).HasColumnName("EoyOpenBal");
            this.Property(t => t.backup4).HasColumnName("backup4");
            this.Property(t => t.year).HasColumnName("year");
            this.Property(t => t.finprep2).HasColumnName("finprep2");
            this.Property(t => t.finprep3).HasColumnName("finprep3");
        }
    }
}
